package MapDemo;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;

public class MapKeySetDemo {
    public static void main(String[] args) {
        Map<String, String> map = new HashMap<String, String>();
        map.put("李晨","范冰冰");
        map.put("邓超","孙俪");
        map.put("文章","马伊琍");
        map.put("汪峰","章子怡");
        System.out.println(map);
        Set<String> keys = map.keySet();
        System.out.println(keys);
        for (Iterator<String> it = keys.iterator(); it.hasNext();) {
            String key = it.next();
            String value = map.get(key);
            System.out.println(key + "=" + value);
        }
    }
}
